<?php 
	slot('title', 'WIKI - ' . $wikiPage->getHumanName() . ' - ' . $wikiPage->getProject()->getName());
	slot('header', "<h1>Revisions: ".$wikiPage->getHumanName()."</h1>");
	//slot('footer', "Footer for ".$wikiPage->getHumanName());
	
	slot('side_bar');
		include_partial('sidebar', array('wikiPage' => $wikiPage));
	end_slot();
?>

<?php include_partial('revisions', array('revisions' => $pager->getResults(), 'wikiPage' => $wikiPage)); ?>

<?php if ($pager->haveToPaginate()): ?>
	<div class="pagnation">
		<?php echo link_to('<<', '@wiki_show_revs_page?pr_slug='.$wikiPage->getPRSlug().'&name='.$wikiPage->getName().'&page=1') ?>
		<?php echo link_to('<', '@wiki_show_revs_page?pr_slug='.$wikiPage->getPRSlug().'&name='.$wikiPage->getName().'&page='.$pager->getPreviousPage()) ?>
		
		<?php foreach ($pager->getLinks() as $page): ?>
			<?php if ($page == $pager->getPage()): ?>
				<?php echo $page ?>
			<?php else: ?>
				<?php echo link_to($page, '@wiki_show_revs_page?pr_slug='.$wikiPage->getPRSlug().'&name='.$wikiPage->getName().'&page='.$page) ?>
			<?php endif; ?>
    	<?php endforeach; ?>
		
		<?php echo link_to('>', '@wiki_show_revs_page?pr_slug='.$wikiPage->getPRSlug().'&name='.$wikiPage->getName().'&page='.$pager->getNextPage()) ?>
		<?php echo link_to('>>', '@wiki_show_revs_page?pr_slug='.$wikiPage->getPRSlug().'&name='.$wikiPage->getName().'&page='.$pager->getLastPage()) ?>

	</div>
<?php endif; ?>

<div class="pagination_desc">
  <strong><?php echo $pager->getNbResults() ?></strong> revisions
 
  <?php if ($pager->haveToPaginate()): ?>
    - page <strong><?php echo $pager->getPage() ?>/<?php echo $pager->getLastPage() ?></strong>
  <?php endif; ?>
</div>